package com.me.forum.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.me.forum.domain.User;
import com.me.forum.request.UserRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface IUserDao extends BaseMapper<User> {
	User findUserByUsername(String username);
	
	User findUserByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
	
	int register(UserRequest ureq);

	int updateById(UserRequest ureq);


	IPage<User> selectByAll(IPage<User> page,@Param("u") UserRequest ureq);

	int insertSelective(UserRequest ureq);

	int insertByRole(@Param("ureq") UserRequest ureq);

















}
